package com.example.apartment.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * 宿舍房间实体类
 *
 * @author wuzexin
 * @date 2021/11/2 12:52
 */
public class Room {

    // 主键id
    @TableId(type = IdType.AUTO)
    private Integer id;

    // 宿舍号
    private Integer roomNum;

    // 可住人数
    private Integer personCount;

    // 住宿费用
    private Integer price;

    // 宿舍楼id
    private Integer buildingId;

    // 宿舍楼名字
    @TableField(exist = false)
    private String buildingName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRoomNum() {
        return roomNum;
    }

    public void setRoomNum(Integer roomNum) {
        this.roomNum = roomNum;
    }

    public Integer getPersonCount() {
        return personCount;
    }

    public void setPersonCount(Integer personCount) {
        this.personCount = personCount;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(Integer buildingId) {
        this.buildingId = buildingId;
    }

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    @Override
    public String toString() {
        return "Room{" +
                "id=" + id +
                ", roomNum=" + roomNum +
                ", personCount=" + personCount +
                ", price=" + price +
                ", buildingId=" + buildingId +
                ", buildingName='" + buildingName + '\'' +
                '}';
    }
}
